<?php
/**
 * User: Administrator
 * Email: aphie1900@sina.com
 * Date & Time: 2017/9/15 0015 16:05
 */

namespace app\api\model;


class Category extends BaseModel
{
    protected $hidden = ['delete_time','update_time'];

    public function img()
    {
        return $this->belongsTo('Image', 'topic_img_id', 'id');
    }

    public static function getAll()
    {
        return self::all([],'img');
    }
}